home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
079c.dms
/
079c.adf
/
how2writeagame.lha
/
how2write_a_game
/
bob_grabber.AMOS
/
bob_grabber.amosSourceCode
Wrap
AMOS Source Code
|
1992-03-06
|
3KB
|
140 lines
' *************************************************************
'
' ===========
'
' BOB GRABBER
'
' ===========
'
' /\/\/\/\/\/\/\/\/\
' By: Paul Nordovics
' \/\/\/\/\/\/\/\/\/
'
' Notes:
' ======
'
' Feel Free To Use This For Whatever, But Don't Pass It Off As
' Your Own Work!
'
' *************************************************************
'
Paper 0
'
' ********************
' Remove Mouse Pointer
' ********************
Hide
'
_START:
'
' ***********************
' Clear Bank 1 = Bob Bank
' ***********************
Erase 1
'
' ****************************************
' Get User To Enter Details Regarding Bobs
' ****************************************
Repeat
Cls 0
K$="n"
Locate 0,0
Input "HOW MANY BOBS DO YOU WISH TO MAKE? ";_BOB_NUMBER
Input "BOB WIDTH (IN PIXELS)? ";_BOB_WIDTH
Input "BOB HEIGHT (IN PIXELS)? ";_BOB_HEIGHT
'
Print
Print "BOBS TO CUT=";_BOB_NUMBER
Print "BOB WIDTH =";_BOB_WIDTH
Print "BOB HEIGHT =";_BOB_HEIGHT
Print
Input "IS THIS CORRECT? (y/n) ";K$
Until K$="y"
'
Curs Off
'
' ******************
' Show Mouse Pointer
' ******************
Show
'
' ***************************************
' Get IFF Picture Via AMOS File Requester
' ***************************************
F$=Fsel$("*.iff","","Pick an IFF picture")
'
' ********************
' Remove Mouse Pointer
' ********************
Hide
'
' *****************************************
' Return To AMOS Editor If Nothing Selected
' *****************************************
If F$="" Then Edit
'
' **************************
' Load Picture Into Screen 0
' **************************
Load Iff F$,0
'
' *************************
' Cut Bobs From IFF Picture
' *************************
X=0 : Y=0 : N=1
Repeat
Get Bob N,X,Y To X+_BOB_WIDTH,Y+_BOB_HEIGHT
Add X,_BOB_WIDTH
If X>319
X=0
Add Y,_BOB_HEIGHT
End If
Add N,1
Add _BOB_NUMBER,-1
Until _BOB_NUMBER=0
'
' ******************
' Show Mouse Pointer
' ******************
Show
'
' *************************************
' Save Bob File Via AMOS File Requester
' *************************************
F$=Fsel$("*.abk","","Save Bobs As")
'
' ********************
' Remove Mouse Pointer
' ********************
Hide
'
If F$="" Then Edit
'
Save F$,1
'
' *****************************************
' Give Enough Time For Disk Buffer To Empty
' *****************************************
Wait 150
'
' ********************************
' Change Colours 1 and 3 To White
' 1=Text Colour, 3=Cursor Colour
' ********************************
Colour 1,$FFF : Colour 3,$FFF
'
Cls 0 : Pen 1 : Paper 0
'
' ***********************************
' Ask If User Wants To Make More Bobs
' ***********************************
Locate 0,0
Input "DO YOU WANT TO MAKE MORE BOBS? (y/n) ";K$
If K$="y"
Goto _START
Else
Edit
End If
'
' -------------------------------------------------------------
'